// 计算函数中元素的和
function getSum(nums: number[]) {
  let sum: number = 0;
  for (let i: number = 0; i < nums.length; i++) sum += nums[i];
  return sum;
}

console.log(getSum([1, 2, 3, 4, 4]));
console.log(getSum([21, 12, 33, 4, 5]));

export { }
